// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by google-apis-code-generator 1.5.1
//     C# generator version: 1.22.0
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

/**
 * \brief
 *   Google Compute Engine Instance Group Updater API Version v1beta1
 *
 * \section ApiInfo API Version Information
 *    <table>
 *      <tr><th>API
 *          <td><a href='https://cloud.google.com/compute/docs/instance-groups/manager/#applying_rolling_updates_using_the_updater_service'>Google Compute Engine Instance Group Updater API</a>
 *      <tr><th>API Version<td>v1beta1
 *      <tr><th>API Rev<td>20161003 (641)
 *      <tr><th>API Docs
 *          <td><a href='https://cloud.google.com/compute/docs/instance-groups/manager/#applying_rolling_updates_using_the_updater_service'>
 *              https://cloud.google.com/compute/docs/instance-groups/manager/#applying_rolling_updates_using_the_updater_service</a>
 *      <tr><th>Discovery Name<td>replicapoolupdater
 *    </table>
 *
 * \section ForMoreInfo For More Information
 *
 * The complete API documentation for using Google Compute Engine Instance Group Updater API can be found at
 * <a href='https://cloud.google.com/compute/docs/instance-groups/manager/#applying_rolling_updates_using_the_updater_service'>https://cloud.google.com/compute/docs/instance-groups/manager/#applying_rolling_updates_using_the_updater_service</a>.
 *
 * For more information about the Google APIs Client Library for .NET, see
 * <a href='https://developers.google.com/api-client-library/dotnet/get_started'>
 * https://developers.google.com/api-client-library/dotnet/get_started</a>
 */

namespace Google.Apis.Replicapoolupdater.v1beta1
{
    /// <summary>The Replicapoolupdater Service.</summary>
    public class ReplicapoolupdaterService : Google.Apis.Services.BaseClientService
    {
        /// <summary>The API version.</summary>
        public const string Version = "v1beta1";

        /// <summary>The discovery version used to generate this service.</summary>
        public static Google.Apis.Discovery.DiscoveryVersion DiscoveryVersionUsed =
            Google.Apis.Discovery.DiscoveryVersion.Version_1_0;

        /// <summary>Constructs a new service.</summary>
        public ReplicapoolupdaterService() :
            this(new Google.Apis.Services.BaseClientService.Initializer()) {}

        /// <summary>Constructs a new service.</summary>
        /// <param name="initializer">The service initializer.</param>
        public ReplicapoolupdaterService(Google.Apis.Services.BaseClientService.Initializer initializer)
            : base(initializer)
        {
            rollingUpdates = new RollingUpdatesResource(this);
            zoneOperations = new ZoneOperationsResource(this);
        }

        /// <summary>Gets the service supported features.</summary>
        public override System.Collections.Generic.IList<string> Features
        {
            get { return new string[0]; }
        }

        /// <summary>Gets the service name.</summary>
        public override string Name
        {
            get { return "replicapoolupdater"; }
        }

        /// <summary>Gets the service base URI.</summary>
        public override string BaseUri
        {
            get { return "https://www.googleapis.com/replicapoolupdater/v1beta1/projects/"; }
        }

        /// <summary>Gets the service base path.</summary>
        public override string BasePath
        {
            get { return "replicapoolupdater/v1beta1/projects/"; }
        }

        /// <summary>Available OAuth 2.0 scopes for use with the Google Compute Engine Instance Group Updater API.</summary>
        public class Scope
        {
            /// <summary>View and manage your data across Google Cloud Platform services</summary>
            public static string CloudPlatform = "https://www.googleapis.com/auth/cloud-platform";

            /// <summary>View your data across Google Cloud Platform services</summary>
            public static string CloudPlatformReadOnly = "https://www.googleapis.com/auth/cloud-platform.read-only";

            /// <summary>View and manage replica pools</summary>
            public static string Replicapool = "https://www.googleapis.com/auth/replicapool";

            /// <summary>View replica pools</summary>
            public static string ReplicapoolReadonly = "https://www.googleapis.com/auth/replicapool.readonly";

        }



        private readonly RollingUpdatesResource rollingUpdates;

        /// <summary>Gets the RollingUpdates resource.</summary>
        public virtual RollingUpdatesResource RollingUpdates
        {
            get { return rollingUpdates; }
        }

        private readonly ZoneOperationsResource zoneOperations;

        /// <summary>Gets the ZoneOperations resource.</summary>
        public virtual ZoneOperationsResource ZoneOperations
        {
            get { return zoneOperations; }
        }
    }

    ///<summary>A base abstract class for Replicapoolupdater requests.</summary>
    public abstract class ReplicapoolupdaterBaseServiceRequest<TResponse> : Google.Apis.Requests.ClientServiceRequest<TResponse>
    {
        ///<summary>Constructs a new ReplicapoolupdaterBaseServiceRequest instance.</summary>
        protected ReplicapoolupdaterBaseServiceRequest(Google.Apis.Services.IClientService service)
            : base(service)
        {
        }

        /// <summary>Data format for the response.</summary>
        /// [default: json]
        [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<AltEnum> Alt { get; set; }

        /// <summary>Data format for the response.</summary>
        public enum AltEnum
        {
            /// <summary>Responses with Content-Type of application/json</summary>
            [Google.Apis.Util.StringValueAttribute("json")]
            Json,
        }

        /// <summary>Selector specifying which fields to include in a partial response.</summary>
        [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Fields { get; set; }

        /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and reports.
        /// Required unless you provide an OAuth 2.0 token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Key { get; set; }

        /// <summary>OAuth 2.0 token for the current user.</summary>
        [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string OauthToken { get; set; }

        /// <summary>Returns response with indentations and line breaks.</summary>
        /// [default: true]
        [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<bool> PrettyPrint { get; set; }

        /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
        /// assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.</summary>
        [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string QuotaUser { get; set; }

        /// <summary>IP address of the site where the request originates. Use this if you want to enforce per-user
        /// limits.</summary>
        [Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string UserIp { get; set; }

        /// <summary>Initializes Replicapoolupdater parameter list.</summary>
        protected override void InitParameters()
        {
            base.InitParameters();

            RequestParameters.Add(
                "alt", new Google.Apis.Discovery.Parameter
                {
                    Name = "alt",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "json",
                    Pattern = null,
                });
            RequestParameters.Add(
                "fields", new Google.Apis.Discovery.Parameter
                {
                    Name = "fields",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "key", new Google.Apis.Discovery.Parameter
                {
                    Name = "key",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "oauth_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "oauth_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "prettyPrint", new Google.Apis.Discovery.Parameter
                {
                    Name = "prettyPrint",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "true",
                    Pattern = null,
                });
            RequestParameters.Add(
                "quotaUser", new Google.Apis.Discovery.Parameter
                {
                    Name = "quotaUser",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "userIp", new Google.Apis.Discovery.Parameter
                {
                    Name = "userIp",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
        }
    }

    /// <summary>The "rollingUpdates" collection of methods.</summary>
    public class RollingUpdatesResource
    {
        private const string Resource = "rollingUpdates";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public RollingUpdatesResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Cancels an update. The update must be PAUSED before it can be cancelled. This has no effect if the
        /// update is already CANCELLED.</summary>
        /// <param name="project">The Google Developers Console project name.</param>
        /// <param name="zone">The name of the
        /// zone in which the update's target resides.</param>
        /// <param name="rollingUpdate">The name of the
        /// update.</param>
        public virtual CancelRequest Cancel(string project, string zone, string rollingUpdate)
        {
            return new CancelRequest(service, project, zone, rollingUpdate);
        }

        /// <summary>Cancels an update. The update must be PAUSED before it can be cancelled. This has no effect if the
        /// update is already CANCELLED.</summary>
        public class CancelRequest : ReplicapoolupdaterBaseServiceRequest<Google.Apis.Replicapoolupdater.v1beta1.Data.Operation>
        {
            /// <summary>Constructs a new Cancel request.</summary>
            public CancelRequest(Google.Apis.Services.IClientService service, string project, string zone, string rollingUpdate)
                : base(service)
            {
                Project = project;
                Zone = zone;
                RollingUpdate = rollingUpdate;
                InitParameters();
            }


            /// <summary>The Google Developers Console project name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>The name of the zone in which the update's target resides.</summary>
            [Google.Apis.Util.RequestParameterAttribute("zone", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Zone { get; private set; }

            /// <summary>The name of the update.</summary>
            [Google.Apis.Util.RequestParameterAttribute("rollingUpdate", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string RollingUpdate { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "cancel"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{project}/zones/{zone}/rollingUpdates/{rollingUpdate}/cancel"; }
            }

            /// <summary>Initializes Cancel parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = @"(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
                    });
                RequestParameters.Add(
                    "zone", new Google.Apis.Discovery.Parameter
                    {
                        Name = "zone",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "rollingUpdate", new Google.Apis.Discovery.Parameter
                    {
                        Name = "rollingUpdate",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Returns information about an update.</summary>
        /// <param name="project">The Google Developers Console project name.</param>
        /// <param name="zone">The name of the
        /// zone in which the update's target resides.</param>
        /// <param name="rollingUpdate">The name of the
        /// update.</param>
        public virtual GetRequest Get(string project, string zone, string rollingUpdate)
        {
            return new GetRequest(service, project, zone, rollingUpdate);
        }

        /// <summary>Returns information about an update.</summary>
        public class GetRequest : ReplicapoolupdaterBaseServiceRequest<Google.Apis.Replicapoolupdater.v1beta1.Data.RollingUpdate>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string project, string zone, string rollingUpdate)
                : base(service)
            {
                Project = project;
                Zone = zone;
                RollingUpdate = rollingUpdate;
                InitParameters();
            }


            /// <summary>The Google Developers Console project name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>The name of the zone in which the update's target resides.</summary>
            [Google.Apis.Util.RequestParameterAttribute("zone", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Zone { get; private set; }

            /// <summary>The name of the update.</summary>
            [Google.Apis.Util.RequestParameterAttribute("rollingUpdate", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string RollingUpdate { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{project}/zones/{zone}/rollingUpdates/{rollingUpdate}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = @"(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
                    });
                RequestParameters.Add(
                    "zone", new Google.Apis.Discovery.Parameter
                    {
                        Name = "zone",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "rollingUpdate", new Google.Apis.Discovery.Parameter
                    {
                        Name = "rollingUpdate",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Inserts and starts a new update.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="project">The Google Developers Console project name.</param>
        /// <param name="zone">The name of the
        /// zone in which the update's target resides.</param>
        public virtual InsertRequest Insert(Google.Apis.Replicapoolupdater.v1beta1.Data.RollingUpdate body, string project, string zone)
        {
            return new InsertRequest(service, body, project, zone);
        }

        /// <summary>Inserts and starts a new update.</summary>
        public class InsertRequest : ReplicapoolupdaterBaseServiceRequest<Google.Apis.Replicapoolupdater.v1beta1.Data.Operation>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Replicapoolupdater.v1beta1.Data.RollingUpdate body, string project, string zone)
                : base(service)
            {
                Project = project;
                Zone = zone;
                Body = body;
                InitParameters();
            }


            /// <summary>The Google Developers Console project name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>The name of the zone in which the update's target resides.</summary>
            [Google.Apis.Util.RequestParameterAttribute("zone", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Zone { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Replicapoolupdater.v1beta1.Data.RollingUpdate Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{project}/zones/{zone}/rollingUpdates"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = @"(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
                    });
                RequestParameters.Add(
                    "zone", new Google.Apis.Discovery.Parameter
                    {
                        Name = "zone",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists recent updates for a given managed instance group, in reverse chronological order and
        /// paginated format.</summary>
        /// <param name="project">The Google Developers Console project name.</param>
        /// <param name="zone">The name of the
        /// zone in which the update's target resides.</param>
        public virtual ListRequest List(string project, string zone)
        {
            return new ListRequest(service, project, zone);
        }

        /// <summary>Lists recent updates for a given managed instance group, in reverse chronological order and
        /// paginated format.</summary>
        public class ListRequest : ReplicapoolupdaterBaseServiceRequest<Google.Apis.Replicapoolupdater.v1beta1.Data.RollingUpdateList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string project, string zone)
                : base(service)
            {
                Project = project;
                Zone = zone;
                InitParameters();
            }


            /// <summary>The Google Developers Console project name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>The name of the zone in which the update's target resides.</summary>
            [Google.Apis.Util.RequestParameterAttribute("zone", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Zone { get; private set; }

            /// <summary>Optional. Filter expression for filtering listed resources.</summary>
            [Google.Apis.Util.RequestParameterAttribute("filter", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Filter { get; set; }

            /// <summary>Optional. Maximum count of results to be returned. Maximum value is 500 and default value is
            /// 500.</summary>
            /// [default: 500]
            /// [minimum: 0]
            /// [maximum: 500]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// <summary>Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a
            /// previous list request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{project}/zones/{zone}/rollingUpdates"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = @"(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
                    });
                RequestParameters.Add(
                    "zone", new Google.Apis.Discovery.Parameter
                    {
                        Name = "zone",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "filter", new Google.Apis.Discovery.Parameter
                    {
                        Name = "filter",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "500",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists the current status for each instance within a given update.</summary>
        /// <param name="project">The Google Developers Console project name.</param>
        /// <param name="zone">The name of the
        /// zone in which the update's target resides.</param>
        /// <param name="rollingUpdate">The name of the
        /// update.</param>
        public virtual ListInstanceUpdatesRequest ListInstanceUpdates(string project, string zone, string rollingUpdate)
        {
            return new ListInstanceUpdatesRequest(service, project, zone, rollingUpdate);
        }

        /// <summary>Lists the current status for each instance within a given update.</summary>
        public class ListInstanceUpdatesRequest : ReplicapoolupdaterBaseServiceRequest<Google.Apis.Replicapoolupdater.v1beta1.Data.InstanceUpdateList>
        {
            /// <summary>Constructs a new ListInstanceUpdates request.</summary>
            public ListInstanceUpdatesRequest(Google.Apis.Services.IClientService service, string project, string zone, string rollingUpdate)
                : base(service)
            {
                Project = project;
                Zone = zone;
                RollingUpdate = rollingUpdate;
                InitParameters();
            }


            /// <summary>The Google Developers Console project name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>The name of the zone in which the update's target resides.</summary>
            [Google.Apis.Util.RequestParameterAttribute("zone", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Zone { get; private set; }

            /// <summary>The name of the update.</summary>
            [Google.Apis.Util.RequestParameterAttribute("rollingUpdate", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string RollingUpdate { get; private set; }

            /// <summary>Optional. Filter expression for filtering listed resources.</summary>
            [Google.Apis.Util.RequestParameterAttribute("filter", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Filter { get; set; }

            /// <summary>Optional. Maximum count of results to be returned. Maximum value is 500 and default value is
            /// 500.</summary>
            /// [default: 500]
            /// [minimum: 0]
            /// [maximum: 500]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// <summary>Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a
            /// previous list request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "listInstanceUpdates"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{project}/zones/{zone}/rollingUpdates/{rollingUpdate}/instanceUpdates"; }
            }

            /// <summary>Initializes ListInstanceUpdates parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = @"(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
                    });
                RequestParameters.Add(
                    "zone", new Google.Apis.Discovery.Parameter
                    {
                        Name = "zone",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "rollingUpdate", new Google.Apis.Discovery.Parameter
                    {
                        Name = "rollingUpdate",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "filter", new Google.Apis.Discovery.Parameter
                    {
                        Name = "filter",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "500",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Pauses the update in state from ROLLING_FORWARD or ROLLING_BACK. Has no effect if invoked when the
        /// state of the update is PAUSED.</summary>
        /// <param name="project">The Google Developers Console project name.</param>
        /// <param name="zone">The name of the
        /// zone in which the update's target resides.</param>
        /// <param name="rollingUpdate">The name of the
        /// update.</param>
        public virtual PauseRequest Pause(string project, string zone, string rollingUpdate)
        {
            return new PauseRequest(service, project, zone, rollingUpdate);
        }

        /// <summary>Pauses the update in state from ROLLING_FORWARD or ROLLING_BACK. Has no effect if invoked when the
        /// state of the update is PAUSED.</summary>
        public class PauseRequest : ReplicapoolupdaterBaseServiceRequest<Google.Apis.Replicapoolupdater.v1beta1.Data.Operation>
        {
            /// <summary>Constructs a new Pause request.</summary>
            public PauseRequest(Google.Apis.Services.IClientService service, string project, string zone, string rollingUpdate)
                : base(service)
            {
                Project = project;
                Zone = zone;
                RollingUpdate = rollingUpdate;
                InitParameters();
            }


            /// <summary>The Google Developers Console project name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>The name of the zone in which the update's target resides.</summary>
            [Google.Apis.Util.RequestParameterAttribute("zone", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Zone { get; private set; }

            /// <summary>The name of the update.</summary>
            [Google.Apis.Util.RequestParameterAttribute("rollingUpdate", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string RollingUpdate { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "pause"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{project}/zones/{zone}/rollingUpdates/{rollingUpdate}/pause"; }
            }

            /// <summary>Initializes Pause parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = @"(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
                    });
                RequestParameters.Add(
                    "zone", new Google.Apis.Discovery.Parameter
                    {
                        Name = "zone",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "rollingUpdate", new Google.Apis.Discovery.Parameter
                    {
                        Name = "rollingUpdate",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Continues an update in PAUSED state. Has no effect if invoked when the state of the update is
        /// ROLLED_OUT.</summary>
        /// <param name="project">The Google Developers Console project name.</param>
        /// <param name="zone">The name of the
        /// zone in which the update's target resides.</param>
        /// <param name="rollingUpdate">The name of the
        /// update.</param>
        public virtual ResumeRequest Resume(string project, string zone, string rollingUpdate)
        {
            return new ResumeRequest(service, project, zone, rollingUpdate);
        }

        /// <summary>Continues an update in PAUSED state. Has no effect if invoked when the state of the update is
        /// ROLLED_OUT.</summary>
        public class ResumeRequest : ReplicapoolupdaterBaseServiceRequest<Google.Apis.Replicapoolupdater.v1beta1.Data.Operation>
        {
            /// <summary>Constructs a new Resume request.</summary>
            public ResumeRequest(Google.Apis.Services.IClientService service, string project, string zone, string rollingUpdate)
                : base(service)
            {
                Project = project;
                Zone = zone;
                RollingUpdate = rollingUpdate;
                InitParameters();
            }


            /// <summary>The Google Developers Console project name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>The name of the zone in which the update's target resides.</summary>
            [Google.Apis.Util.RequestParameterAttribute("zone", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Zone { get; private set; }

            /// <summary>The name of the update.</summary>
            [Google.Apis.Util.RequestParameterAttribute("rollingUpdate", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string RollingUpdate { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "resume"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{project}/zones/{zone}/rollingUpdates/{rollingUpdate}/resume"; }
            }

            /// <summary>Initializes Resume parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = @"(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
                    });
                RequestParameters.Add(
                    "zone", new Google.Apis.Discovery.Parameter
                    {
                        Name = "zone",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "rollingUpdate", new Google.Apis.Discovery.Parameter
                    {
                        Name = "rollingUpdate",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Rolls back the update in state from ROLLING_FORWARD or PAUSED. Has no effect if invoked when the
        /// state of the update is ROLLED_BACK.</summary>
        /// <param name="project">The Google Developers Console project name.</param>
        /// <param name="zone">The name of the
        /// zone in which the update's target resides.</param>
        /// <param name="rollingUpdate">The name of the
        /// update.</param>
        public virtual RollbackRequest Rollback(string project, string zone, string rollingUpdate)
        {
            return new RollbackRequest(service, project, zone, rollingUpdate);
        }

        /// <summary>Rolls back the update in state from ROLLING_FORWARD or PAUSED. Has no effect if invoked when the
        /// state of the update is ROLLED_BACK.</summary>
        public class RollbackRequest : ReplicapoolupdaterBaseServiceRequest<Google.Apis.Replicapoolupdater.v1beta1.Data.Operation>
        {
            /// <summary>Constructs a new Rollback request.</summary>
            public RollbackRequest(Google.Apis.Services.IClientService service, string project, string zone, string rollingUpdate)
                : base(service)
            {
                Project = project;
                Zone = zone;
                RollingUpdate = rollingUpdate;
                InitParameters();
            }


            /// <summary>The Google Developers Console project name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>The name of the zone in which the update's target resides.</summary>
            [Google.Apis.Util.RequestParameterAttribute("zone", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Zone { get; private set; }

            /// <summary>The name of the update.</summary>
            [Google.Apis.Util.RequestParameterAttribute("rollingUpdate", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string RollingUpdate { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "rollback"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{project}/zones/{zone}/rollingUpdates/{rollingUpdate}/rollback"; }
            }

            /// <summary>Initializes Rollback parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = @"(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
                    });
                RequestParameters.Add(
                    "zone", new Google.Apis.Discovery.Parameter
                    {
                        Name = "zone",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "rollingUpdate", new Google.Apis.Discovery.Parameter
                    {
                        Name = "rollingUpdate",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "zoneOperations" collection of methods.</summary>
    public class ZoneOperationsResource
    {
        private const string Resource = "zoneOperations";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public ZoneOperationsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Retrieves the specified zone-specific operation resource.</summary>
        /// <param name="project">Name of the project scoping this request.</param>
        /// <param name="zone">Name of the zone
        /// scoping this request.</param>
        /// <param name="operation">Name of the operation resource to return.</param>
        public virtual GetRequest Get(string project, string zone, string operation)
        {
            return new GetRequest(service, project, zone, operation);
        }

        /// <summary>Retrieves the specified zone-specific operation resource.</summary>
        public class GetRequest : ReplicapoolupdaterBaseServiceRequest<Google.Apis.Replicapoolupdater.v1beta1.Data.Operation>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string project, string zone, string operation)
                : base(service)
            {
                Project = project;
                Zone = zone;
                Operation = operation;
                InitParameters();
            }


            /// <summary>Name of the project scoping this request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Name of the zone scoping this request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("zone", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Zone { get; private set; }

            /// <summary>Name of the operation resource to return.</summary>
            [Google.Apis.Util.RequestParameterAttribute("operation", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Operation { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{project}/zones/{zone}/operations/{operation}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = @"(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
                    });
                RequestParameters.Add(
                    "zone", new Google.Apis.Discovery.Parameter
                    {
                        Name = "zone",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "operation", new Google.Apis.Discovery.Parameter
                    {
                        Name = "operation",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves the list of Operation resources contained within the specified zone.</summary>
        /// <param name="project">Name of the project scoping this request.</param>
        /// <param name="zone">Name of the zone
        /// scoping this request.</param>
        public virtual ListRequest List(string project, string zone)
        {
            return new ListRequest(service, project, zone);
        }

        /// <summary>Retrieves the list of Operation resources contained within the specified zone.</summary>
        public class ListRequest : ReplicapoolupdaterBaseServiceRequest<Google.Apis.Replicapoolupdater.v1beta1.Data.OperationList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string project, string zone)
                : base(service)
            {
                Project = project;
                Zone = zone;
                InitParameters();
            }


            /// <summary>Name of the project scoping this request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("project", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Project { get; private set; }

            /// <summary>Name of the zone scoping this request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("zone", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Zone { get; private set; }

            /// <summary>Optional. Filter expression for filtering listed resources.</summary>
            [Google.Apis.Util.RequestParameterAttribute("filter", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Filter { get; set; }

            /// <summary>Optional. Maximum count of results to be returned. Maximum value is 500 and default value is
            /// 500.</summary>
            /// [default: 500]
            /// [minimum: 0]
            /// [maximum: 500]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// <summary>Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a
            /// previous list request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{project}/zones/{zone}/operations"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "project", new Google.Apis.Discovery.Parameter
                    {
                        Name = "project",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = @"(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
                    });
                RequestParameters.Add(
                    "zone", new Google.Apis.Discovery.Parameter
                    {
                        Name = "zone",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "filter", new Google.Apis.Discovery.Parameter
                    {
                        Name = "filter",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "500",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }
}

namespace Google.Apis.Replicapoolupdater.v1beta1.Data
{    

    /// <summary>Update of a single instance.</summary>
    public class InstanceUpdate : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Errors that occurred during the instance update.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("error")]
        public virtual InstanceUpdate.ErrorData Error { get; set; } 

        /// <summary>Fully-qualified URL of the instance being updated.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("instance")]
        public virtual string Instance { get; set; } 

        /// <summary>Status of the instance update. Possible values are: - "PENDING": The instance update is pending
        /// execution. - "ROLLING_FORWARD": The instance update is going forward. - "ROLLING_BACK": The instance update
        /// is being rolled back. - "PAUSED": The instance update is temporarily paused (inactive). - "ROLLED_OUT": The
        /// instance update is finished, the instance is running the new template. - "ROLLED_BACK": The instance update
        /// is finished, the instance has been reverted to the previous template. - "CANCELLED": The instance update is
        /// paused and no longer can be resumed, undefined in which template the instance is running.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual string Status { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
        

        /// <summary>Errors that occurred during the instance update.</summary>
        public class ErrorData
        {
            /// <summary>[Output Only] The array of errors encountered while processing this operation.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("errors")]
            public virtual System.Collections.Generic.IList<ErrorData.ErrorsData> Errors { get; set; } 

            

            public class ErrorsData
            {
                /// <summary>[Output Only] The error type identifier for this error.</summary>
                [Newtonsoft.Json.JsonPropertyAttribute("code")]
                public virtual string Code { get; set; } 

                /// <summary>[Output Only] Indicates the field in the request that caused the error. This property is
                /// optional.</summary>
                [Newtonsoft.Json.JsonPropertyAttribute("location")]
                public virtual string Location { get; set; } 

                /// <summary>[Output Only] An optional, human-readable error message.</summary>
                [Newtonsoft.Json.JsonPropertyAttribute("message")]
                public virtual string Message { get; set; } 

            }
        }
    }    

    /// <summary>Response returned by ListInstanceUpdates method.</summary>
    public class InstanceUpdateList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Collection of requested instance updates.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<InstanceUpdate> Items { get; set; } 

        /// <summary>[Output Only] Type of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>A token used to continue a truncated list request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>[Output Only] The fully qualified URL for the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>An operation resource, used to manage asynchronous API requests.</summary>
    public class Operation : Google.Apis.Requests.IDirectResponseSchema
    {
        [Newtonsoft.Json.JsonPropertyAttribute("clientOperationId")]
        public virtual string ClientOperationId { get; set; } 

        /// <summary>[Output Only] Creation timestamp in RFC3339 text format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("creationTimestamp")]
        public virtual string CreationTimestamp { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("endTime")]
        public virtual string EndTime { get; set; } 

        /// <summary>[Output Only] If errors occurred during processing of this operation, this field will be
        /// populated.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("error")]
        public virtual Operation.ErrorData Error { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("httpErrorMessage")]
        public virtual string HttpErrorMessage { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("httpErrorStatusCode")]
        public virtual System.Nullable<int> HttpErrorStatusCode { get; set; } 

        /// <summary>[Output Only] Unique identifier for the resource; defined by the server.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual System.Nullable<ulong> Id { get; set; } 

        /// <summary>[Output Only] The time that this operation was requested. This is in RFC 3339 format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("insertTime")]
        public virtual string InsertTime { get; set; } 

        /// <summary>[Output Only] Type of the resource. Always replicapoolupdater#operation for Operation
        /// resources.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>[Output Only] Name of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("operationType")]
        public virtual string OperationType { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("progress")]
        public virtual System.Nullable<int> Progress { get; set; } 

        /// <summary>[Output Only] URL of the region where the operation resides.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("region")]
        public virtual string Region { get; set; } 

        /// <summary>[Output Only] The fully qualified URL for the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>[Output Only] The time that this operation was started by the server. This is in RFC 3339
        /// format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("startTime")]
        public virtual string StartTime { get; set; } 

        /// <summary>[Output Only] Status of the operation. Can be one of the following: "PENDING", "RUNNING", or
        /// "DONE".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual string Status { get; set; } 

        /// <summary>[Output Only] An optional textual description of the current status of the operation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("statusMessage")]
        public virtual string StatusMessage { get; set; } 

        /// <summary>[Output Only] Unique target id which identifies a particular incarnation of the target.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("targetId")]
        public virtual System.Nullable<ulong> TargetId { get; set; } 

        /// <summary>[Output Only] URL of the resource the operation is mutating.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("targetLink")]
        public virtual string TargetLink { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("user")]
        public virtual string User { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("warnings")]
        public virtual System.Collections.Generic.IList<Operation.WarningsData> Warnings { get; set; } 

        /// <summary>[Output Only] URL of the zone where the operation resides.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("zone")]
        public virtual string Zone { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
        

        /// <summary>[Output Only] If errors occurred during processing of this operation, this field will be
        /// populated.</summary>
        public class ErrorData
        {
            /// <summary>[Output Only] The array of errors encountered while processing this operation.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("errors")]
            public virtual System.Collections.Generic.IList<ErrorData.ErrorsData> Errors { get; set; } 

            

            public class ErrorsData
            {
                /// <summary>[Output Only] The error type identifier for this error.</summary>
                [Newtonsoft.Json.JsonPropertyAttribute("code")]
                public virtual string Code { get; set; } 

                /// <summary>[Output Only] Indicates the field in the request that caused the error. This property is
                /// optional.</summary>
                [Newtonsoft.Json.JsonPropertyAttribute("location")]
                public virtual string Location { get; set; } 

                /// <summary>[Output Only] An optional, human-readable error message.</summary>
                [Newtonsoft.Json.JsonPropertyAttribute("message")]
                public virtual string Message { get; set; } 

            }
        }    

        public class WarningsData
        {
            /// <summary>[Output only] The warning type identifier for this warning.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("code")]
            public virtual string Code { get; set; } 

            /// <summary>[Output only] Metadata for this warning in key:value format.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("data")]
            public virtual System.Collections.Generic.IList<WarningsData.DataData> Data { get; set; } 

            /// <summary>[Output only] Optional human-readable details for this warning.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("message")]
            public virtual string Message { get; set; } 

            

            public class DataData
            {
                /// <summary>[Output Only] Metadata key for this warning.</summary>
                [Newtonsoft.Json.JsonPropertyAttribute("key")]
                public virtual string Key { get; set; } 

                /// <summary>[Output Only] Metadata value for this warning.</summary>
                [Newtonsoft.Json.JsonPropertyAttribute("value")]
                public virtual string Value { get; set; } 

            }
        }
    }    

    /// <summary>Contains a list of Operation resources.</summary>
    public class OperationList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Output Only] Unique identifier for the resource; defined by the server.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>[Output Only] The Operation resources.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Operation> Items { get; set; } 

        /// <summary>[Output Only] Type of resource. Always replicapoolupdater#operationList for OperationList
        /// resources.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>[Output Only] A token used to continue a truncate.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>[Output Only] The fully qualified URL for the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>The following represents a resource describing a single update (rollout) of a group of instances to the
    /// given template.</summary>
    public class RollingUpdate : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Specifies the action to take for each instance within the instance group. This can be RECREATE
        /// which will recreate each instance and is only available for managed instance groups. It can also be REBOOT
        /// which performs a soft reboot for each instance and is only available for regular (non-managed) instance
        /// groups.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("actionType")]
        public virtual string ActionType { get; set; } 

        /// <summary>[Output Only] Creation timestamp in RFC3339 text format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("creationTimestamp")]
        public virtual string CreationTimestamp { get; set; } 

        /// <summary>An optional textual description of the resource; provided by the client when the resource is
        /// created.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("description")]
        public virtual string Description { get; set; } 

        /// <summary>[Output Only] Errors that occurred during the rolling update.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("error")]
        public virtual RollingUpdate.ErrorData Error { get; set; } 

        /// <summary>[Output Only] Unique identifier for the resource; defined by the server.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Fully-qualified URL of an instance group being updated. Exactly one of instanceGroupManager and
        /// instanceGroup must be set.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("instanceGroup")]
        public virtual string InstanceGroup { get; set; } 

        /// <summary>Fully-qualified URL of an instance group manager being updated. Exactly one of instanceGroupManager
        /// and instanceGroup must be set.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("instanceGroupManager")]
        public virtual string InstanceGroupManager { get; set; } 

        /// <summary>Fully-qualified URL of an instance template to apply.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("instanceTemplate")]
        public virtual string InstanceTemplate { get; set; } 

        /// <summary>[Output Only] Type of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Fully-qualified URL of the instance template encountered while starting the update.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("oldInstanceTemplate")]
        public virtual string OldInstanceTemplate { get; set; } 

        /// <summary>Parameters of the update process.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("policy")]
        public virtual RollingUpdate.PolicyData Policy { get; set; } 

        /// <summary>[Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement
        /// that this be linear or support any granularity of operations. This should not be used to guess at when the
        /// update will be complete. This number should be monotonically increasing as the update progresses.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("progress")]
        public virtual System.Nullable<int> Progress { get; set; } 

        /// <summary>[Output Only] The fully qualified URL for the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>[Output Only] Status of the update. Possible values are: - "ROLLING_FORWARD": The update is going
        /// forward. - "ROLLING_BACK": The update is being rolled back. - "PAUSED": The update is temporarily paused
        /// (inactive). - "ROLLED_OUT": The update is finished, all instances have been updated successfully. -
        /// "ROLLED_BACK": The update is finished, all instances have been reverted to the previous template. -
        /// "CANCELLED": The update is paused and no longer can be resumed, undefined how many instances are running in
        /// which template.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual string Status { get; set; } 

        /// <summary>[Output Only] An optional textual description of the current status of the update.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("statusMessage")]
        public virtual string StatusMessage { get; set; } 

        /// <summary>[Output Only] User who requested the update, for example: user@example.com.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("user")]
        public virtual string User { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
        

        /// <summary>[Output Only] Errors that occurred during the rolling update.</summary>
        public class ErrorData
        {
            /// <summary>[Output Only] The array of errors encountered while processing this operation.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("errors")]
            public virtual System.Collections.Generic.IList<ErrorData.ErrorsData> Errors { get; set; } 

            

            public class ErrorsData
            {
                /// <summary>[Output Only] The error type identifier for this error.</summary>
                [Newtonsoft.Json.JsonPropertyAttribute("code")]
                public virtual string Code { get; set; } 

                /// <summary>[Output Only] Indicates the field in the request that caused the error. This property is
                /// optional.</summary>
                [Newtonsoft.Json.JsonPropertyAttribute("location")]
                public virtual string Location { get; set; } 

                /// <summary>[Output Only] An optional, human-readable error message.</summary>
                [Newtonsoft.Json.JsonPropertyAttribute("message")]
                public virtual string Message { get; set; } 

            }
        }    

        /// <summary>Parameters of the update process.</summary>
        public class PolicyData
        {
            /// <summary>Number of instances to update before the updater pauses the rolling update.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("autoPauseAfterInstances")]
            public virtual System.Nullable<int> AutoPauseAfterInstances { get; set; } 

            /// <summary>The maximum amount of time that the updater waits for a HEALTHY state after all of the update
            /// steps are complete. If the HEALTHY state is not received before the deadline, the instance update is
            /// considered a failure.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("instanceStartupTimeoutSec")]
            public virtual System.Nullable<int> InstanceStartupTimeoutSec { get; set; } 

            /// <summary>The maximum number of instances that can be updated simultaneously. An instance update is
            /// considered complete only after the instance is restarted and initialized.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("maxNumConcurrentInstances")]
            public virtual System.Nullable<int> MaxNumConcurrentInstances { get; set; } 

            /// <summary>The maximum number of instance updates that can fail before the group update is considered a
            /// failure. An instance update is considered failed if any of its update actions (e.g. Stop call on
            /// Instance resource in Rolling Reboot) failed with permanent failure, or if the instance is in an
            /// UNHEALTHY state after it finishes all of the update actions.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("maxNumFailedInstances")]
            public virtual System.Nullable<int> MaxNumFailedInstances { get; set; } 

            /// <summary>The minimum amount of time that the updater spends to update each instance. Update time is the
            /// time it takes to complete all update actions (e.g. Stop call on Instance resource in Rolling Reboot),
            /// reboot, and initialize. If the instance update finishes early, the updater pauses for the remainder of
            /// the time before it starts the next instance update.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("minInstanceUpdateTimeSec")]
            public virtual System.Nullable<int> MinInstanceUpdateTimeSec { get; set; } 

        }
    }    

    /// <summary>Response returned by List method.</summary>
    public class RollingUpdateList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Collection of requested updates.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<RollingUpdate> Items { get; set; } 

        /// <summary>[Output Only] Type of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>A token used to continue a truncated list request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>[Output Only] The fully qualified URL for the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }
}
